package com.fishing.util.personal;

import java.util.List;

import com.fishing.entity.ItemInfo;

public class RankRewardsToJsonString {
	public String convertRankRewardsToJsonString(List<List<ItemInfo>> lst)
	{
	    StringBuilder sb = new StringBuilder();
	    sb.append("[");
	    for (int i = 0; i < lst.size(); ++i)
	    {
	        List<ItemInfo> rankItems = lst.get(i);
	        if (i > 0)
	            sb.append(",");
	        sb.append("[");
	        for (int j = 0; j < rankItems.size(); ++j)
	        {
	            if (j > 0)
	                sb.append(",");
	                ItemInfo item = rankItems.get(j);
	            //sb.append(String.format("[%1$,%2$,%3$]",item.ItemId,item.ItemSubld,item.ItemCount));
	        }
	        sb.append("]");
	    }
	    sb.append("]");
		return sb.toString();
	}
}
